package com.app.medicalcontrol.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import com.app.medicalcontrol.R;
import com.app.medicalcontrol.bean.MessageListBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;

/**
 * Created by asus01 on 2017/9/22.
 */

public class MessageAdapter extends BaseQuickAdapter<MessageListBean.MessageBean, BaseViewHolder> {

    public MessageAdapter(@LayoutRes int layoutResId, @Nullable List<MessageListBean.MessageBean> data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, final MessageListBean.MessageBean item) {
            helper.setText(R.id.text,""+item.getContent());
            if(item.getIs_read() ==0){
                helper.setTextColor(R.id.text,mContext.getResources().getColor(R.color.base_text_dark_grey));
            }else {
                helper.setTextColor(R.id.text,mContext.getResources().getColor(R.color.white));
            }
        }

}

